Skip to contentSkip to conversation

MEMCG: memcontrol: make local symbol static

PATCH-next Christopher Díaz Riveros 2 participants 3 messages Jan 18, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Fixes the following sparse warning:

mm/memcontrol.c:1097:14: warning:
symbol 'memcg1_stats' was not declared. Should it be static?

---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol.c +1 -1
index c3d1eaef752d..396674fd97ef 100644
@@ -1094,7 +1094,7 @@ static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg)
 	return false;
 }
 
-unsigned int memcg1_stats[] = {
+static unsigned int memcg1_stats[] = {
 	MEMCG_CACHE,
 	MEMCG_RSS,
 	MEMCG_RSS_HUGE,
Signature · 7 lines
2.15.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#1 lore raw

mm/memcontrol.c

Quoted 11 lines · Christopher Díaz Riveros

Fixes the following sparse warning:

mm/memcontrol.c:1097:14: warning:
symbol 'memcg1_stats' was not declared. Should it be static?

---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol.c +0 -0

[]

mm/memcontrol.c static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg) · line 1097

Quoted 6 lines
mm/memcontrol.c +1 -1
@@ -1094,7 +1094,7 @@ static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg)
 	return false;
 }
 
-unsigned int memcg1_stats[] = {
+static unsigned int memcg1_stats[] = {

This should almost certainly be static const

mm/memcontrol.c static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg) · line 1100

Quoted 3 lines
mm/memcontrol.c +0 -0
 	MEMCG_CACHE,
 	MEMCG_RSS,
 	MEMCG_RSS_HUGE,

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
In reply to Christopher Díaz Riveros

mm/memcontrol.c

Quoted 11 lines · Christopher Díaz Riveros

Fixes the following sparse warning:

mm/memcontrol.c:1097:14: warning:
symbol 'memcg1_stats' was not declared. Should it be static?

---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memcontrol.c +0 -0

[]

mm/memcontrol.c static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg) · line 1097

Quoted 6 lines
mm/memcontrol.c +1 -1
@@ -1094,7 +1094,7 @@ static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg)
 	return false;
 }
 
-unsigned int memcg1_stats[] = {
+static unsigned int memcg1_stats[] = {

This should almost certainly be static const

Quoted 3 lines
mm/memcontrol.c +0 -0
 	MEMCG_CACHE,
 	MEMCG_RSS,
 	MEMCG_RSS_HUGE,